package na.learn.java;

public class TestMethodInvocation {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Super1 sp1 = new Super1();
		Super1 sp2 = new Base1();
		sp1.print(new Super1());
		sp2.print(new Super1());
		
		what(null);

	}
	
	public static void what(Object obj){
		System.out.println("object");
	}
	
	/*public static void what(String str) {
		System.out.println("String");
	}*/
	
	public static void what(Double str) {
		System.out.println("Double");
	}

}


class Super1 {
	
	void print(Super1 sp){
		System.out.println("Super");
	}
	
}

class Base1 extends Super1 {
	void print(Base1 sp) {
		System.out.println("Base");
	}
}
